<?php /*a:4:{s:58:"D:\projects\junhe\app\data\view\article\article\index.html";i:1740136709;s:58:"D:\projects\junhe\app\data\view\..\..\admin\view\main.html";i:1740136709;s:63:"D:\projects\junhe\app\data\view\article\article\form_style.html";i:1740136709;s:65:"D:\projects\junhe\app\data\view\article\article\index_search.html";i:1740136709;}*/ ?>
<div class="layui-card">
    
    
    <?php if(!(empty($title) || (($title instanceof \think\Collection || $title instanceof \think\Paginator ) && $title->isEmpty()))): ?>
    <div class="layui-card-header">
        <span class="layui-icon font-s10 color-desc margin-right-5">&#xe65b;</span><?php echo htmlentities((isset($title) && ($title !== '')?$title:''),ENT_QUOTES); ?>
        <div class="pull-right">
<?php if(!empty($tableName) && $isParentCat == 0): ?>
<!--<?php if(auth("add")): ?>-->
<button data-open='<?php echo url("add"); if(!empty($cateId)): ?>?get_cat_id=<?php echo htmlentities($cateId,ENT_QUOTES); ?>&content_template_id=<?php echo htmlentities($contentTemplateId,ENT_QUOTES); ?><?php endif; ?>' data-title="添加内容" class='layui-btn layui-btn-sm layui-btn-primary'>添加内容</button>
<!--<?php endif; ?>-->
<!--<?php if(auth("remove")): ?>-->
<button data-action='<?php echo url("remove"); ?>' data-rule="id#{key};content_template_id#<?php echo htmlentities($contentTemplateId,ENT_QUOTES); ?>" class='layui-btn layui-btn-sm layui-btn-primary'>删除内容</button>
<!--<?php endif; ?>-->
<!--<?php if(auth("move_batch") && count($list)>0): ?>-->
<button data-modal='<?php echo url("move_batch"); ?>' data-rule="id#{key};content_template_id#<?php echo htmlentities($contentTemplateId,ENT_QUOTES); ?>;this_cat#<?php echo htmlentities($cateId,ENT_QUOTES); ?>"  data-title="批量移动" class='layui-btn layui-btn-sm layui-btn-normal'>批量移动</button>

<!--<?php endif; ?>-->
<?php endif; ?>
</div>
    </div>
    <?php endif; ?>
    
    <div class="layui-card-line"></div>
    <div class="layui-card-body">
        <div class="layui-card-html">
            
<style>
    .layui-side {
        display: none;
    }
    .layui-header {
        display: none;
    }
    .layui-body{
        top:0 !important;
        left:0 !important;
        overflow: hidden !important;
    }
    .layui-card-html{
        padding: 0 !important;
    }
    .layui-card-header{
        top:0 !important;
        left:0 !important;
    }
    .think-box-shadow{
        margin-top: 1px;
        min-height: 100vh;
    }
    .think-box-shadow table{
        margin: 0;
    }
    .layui-table td, .layui-table th {
        padding: 9px 15px !important;
    }
    .pagination-container{
        padding: 10px 10px;
    }
    .pagination span,.pagination a{
        padding: 5px 10px;
        font-size: 14px;
        border: #ccc solid 1px;

        margin: 0 5px;
    }

    .layui-card-body::-webkit-scrollbar {
        width: 3px!important;
    }
    .layui-card-body::-webkit-scrollbar-thumb {
        border-radius: 10px!important;

        /*background: #AA3130!important;*/
    }
    .layui-card-body::-webkit-scrollbar-track {

        border-radius: 10px!important;
        background: #fbfbfb!important;
    }

    .think-radio input[type=radio]{
        display: none !important;
    }

    .font-red{
        color:#AA3130;
    }
    .back-red{
        background-color:#AA3130;
    }
</style>
<div class="think-box-shadow padding-0">
    <?php if(!empty($tableName) && $isParentCat == 0): ?>
        <fieldset>
    <legend>条件搜索</legend>
    <form class="layui-form layui-form-pane form-search" action="<?php echo request()->url(); ?>" onsubmit="return false" method="get" autocomplete="off">
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">图文标题</label>
            <div class="layui-input-inline">
                <input name="title" value="<?php echo htmlentities((isset($get['title']) && ($get['title'] !== '')?$get['title']:''),ENT_QUOTES); ?>" placeholder="请输入图文标题" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-inline layui-hide">
            <label class="layui-form-label">图文分类</label>
            <div class="layui-input-inline">
                <select class="layui-select" name="cat">
                    <option value="">-- 全部 --</option>
                    <?php foreach($clist as $v): if($v['id'].'' == input('cat')): ?>
                        <option selected value="<?php echo htmlentities($v['id'],ENT_QUOTES); ?>"><?php echo htmlentities($v['title'],ENT_QUOTES); ?></option>
                    <!--<?php else: ?>-->
                        <option value="<?php echo htmlentities($v['id'],ENT_QUOTES); ?>"><?php echo htmlentities($v['title'],ENT_QUOTES); ?></option>
                    <!--<?php endif; ?>-->
                    <?php endforeach; ?>
                </select>
            </div>
        </div>
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-inline">
                <select class="layui-select" name="status">
                    <?php foreach([''=>'- 全部 -','1'=>'正常','0'=>'停用'] as $k=>$v): if($k.'' == input('status')): ?>
                    <option selected value="<?php echo htmlentities($k,ENT_QUOTES); ?>"><?php echo htmlentities($v,ENT_QUOTES); ?></option>
                    <!--<?php else: ?>-->
                    <option value="<?php echo htmlentities($k,ENT_QUOTES); ?>"><?php echo htmlentities($v,ENT_QUOTES); ?></option>
                    <!--<?php endif; ?>-->
                    <?php endforeach; ?>
                </select>
            </div>
        </div>
        <div class="layui-form-item layui-inline">
            <input type="hidden" name="get_cat_id" value="<?php echo htmlentities($cateId,ENT_QUOTES); ?>" >
            <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜索</button>
        </div>
    </form>
    <script>form.render()</script>
</fieldset>
    <?php endif; ?>
    <table class="layui-table margin-top-10" lay-skin="line">
        <?php if(!(empty($list) || (($list instanceof \think\Collection || $list instanceof \think\Paginator ) && $list->isEmpty()))): ?>
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <input data-auto-none data-check-target='.list-check-box' type='checkbox'>
            </th>
            <th class='list-table-sort-td'>
                <button type="button" data-reload class="layui-btn layui-btn-xs">刷新</button>
            </th>
            <th class='text-center nowrap' width="3%">ID</th>
            <th class='text-center nowrap' width="8%">所属栏目</th>
            <th class='text-center wrap' width="50%">内容标题</th>
            <th class='text-center nowrap' width="6%">是否推荐</th>
            <th class='text-center nowrap' width="6%">状态</th>

            <th class='text-center nowrap' width="10%">创建日期</th>
            <th></th>
        </tr>
        </thead>
        <?php endif; ?>
        <tbody>
        <?php foreach($list as $key=>$vo): ?>
        <tr data-dbclick>
            <td class='list-table-check-td think-checkbox'><input class="list-check-box" value='<?php echo htmlentities($vo['id'],ENT_QUOTES); ?>' type='checkbox'></td>
            <td class='list-table-sort-td'><input data-action-blur="<?php echo request()->url(); ?>" data-value="id#<?php echo htmlentities($vo['id'],ENT_QUOTES); ?>;action#sort;sort#{value}" data-loading="false" value="<?php echo htmlentities($vo['sort'],ENT_QUOTES); ?>" class="list-sort-input"></td>
            <td class='text-center nowrap'>
                <?php echo htmlentities($vo['id'],ENT_QUOTES); ?>
            </td>
            <td class='text-center nowrap'>
                <a href="/index/article/list/id/<?php echo htmlentities($vo['cate']['id'],ENT_QUOTES); ?>.html" target="_blank"><?php echo htmlentities((isset($vo['cate']['title']) && ($vo['cate']['title'] !== '')?$vo['cate']['title']:'--'),ENT_QUOTES); ?></a>
            </td>
            <td class='text-left wrap'>
                <?php if(!(empty($vo['logo']) || (($vo['logo'] instanceof \think\Collection || $vo['logo'] instanceof \think\Paginator ) && $vo['logo']->isEmpty()))): ?>
                <img data-tips-image style="width:60px;height:60px" src="<?php echo htmlentities((isset($vo['logo']) && ($vo['logo'] !== '')?$vo['logo']:''),ENT_QUOTES); ?>" class="layui-col-sm4 margin-right-5 text-top inline-block">
                <?php endif; ?>
                <div class="inline-block layui-col-sm8">
                    <a href="/index/article/show/cat_id/<?php echo htmlentities($vo['cat_id'],ENT_QUOTES); ?>/id/<?php echo htmlentities($vo['id'],ENT_QUOTES); ?>.html" target="_blank"><?php echo htmlentities((isset($vo['title']) && ($vo['title'] !== '')?$vo['title']:'--'),ENT_QUOTES); ?></a>
                </div>
            </td>

            <td class='text-center nowrap'>
                <?php if(isset($vo['is_best']) and $vo['is_best'] == 1): ?>
                        <!--<?php if(auth("no_recommend")): ?>-->
                    <a class="layui-btn layui-btn-sm" data-action="<?php echo url('no_recommend'); ?>" data-confirm="确定关闭首页推荐吗？" data-value="id#<?php echo htmlentities($vo['id'],ENT_QUOTES); ?>;is_best#0;content_template_id#<?php echo htmlentities($contentTemplateId,ENT_QUOTES); ?>">开启</a>
                        <!--<?php else: ?>-->
                    <a data-tips-text="您无权限进行此操作！" class="layui-btn layui-btn-sm layui-disabled">开启</a>
                        <!--<?php endif; ?>-->
                <?php else: ?>
                        <!--<?php if(auth("to_recommend")): ?>-->
                    <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="<?php echo url('to_recommend'); ?>" data-confirm="确定开启首页推荐吗？" data-value="id#<?php echo htmlentities($vo['id'],ENT_QUOTES); ?>;is_best#1;content_template_id#<?php echo htmlentities($contentTemplateId,ENT_QUOTES); ?>">关闭</a>
                        <!--<?php else: ?>-->
                    <a data-tips-text="您无权限进行此操作！" class="layui-btn layui-btn-sm layui-btn-primary layui-disabled">关闭</a>
                        <!--<?php endif; ?>-->
                <?php endif; ?>
            </td>

            <td class='text-center nowrap padding-0 relative'>

                <?php if(isset($vo['status']) and $vo['status'] == 1): ?>
                <!--<?php if(auth("forbid")): ?>-->
                <a class="layui-btn layui-btn-sm" data-action="<?php echo url('forbid'); ?>" data-confirm="确定关闭首页推荐吗？" data-value="id#<?php echo htmlentities($vo['id'],ENT_QUOTES); ?>;status#0;content_template_id#<?php echo htmlentities($contentTemplateId,ENT_QUOTES); ?>">正常</a>
                <!--<?php else: ?>-->
                <a data-tips-text="您无权限进行此操作！" class="layui-btn layui-btn-sm layui-disabled">正常</a>
                <!--<?php endif; ?>-->
                <?php else: ?>
                <!--<?php if(auth("resume")): ?>-->
                <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="<?php echo url('resume'); ?>" data-confirm="确定开启首页推荐吗？" data-value="id#<?php echo htmlentities($vo['id'],ENT_QUOTES); ?>;status#1;content_template_id#<?php echo htmlentities($contentTemplateId,ENT_QUOTES); ?>">停用</a>
                <!--<?php else: ?>-->
                <a data-tips-text="您无权限进行此操作！" class="layui-btn layui-btn-sm layui-btn-primary layui-disabled">停用</a>
                <!--<?php endif; ?>-->
                <?php endif; ?>

            </td>
            <td class='text-center nowrap'><?php echo htmlentities($vo['create_at'],ENT_QUOTES); ?></td>
            <td class='text-right nowrap'>

                <div class="nowrap margin-bottom-5">
                    <?php if(auth("edit")): ?>
                    <a data-dbclick class="layui-btn layui-btn-sm" data-open='<?php echo url("edit"); ?>?id=<?php echo htmlentities($vo['id'],ENT_QUOTES); ?>&get_cat_id=<?php echo htmlentities($cateId,ENT_QUOTES); ?>&template_id=<?php echo htmlentities($templateId,ENT_QUOTES); ?>&content_template_id=<?php echo htmlentities($contentTemplateId,ENT_QUOTES); ?>'>编辑</a>
                    <?php else: ?>
                    <a data-tips-text="您无权限进行此操作！" class="layui-btn layui-btn-sm layui-btn-primary layui-disabled">修改</a>
                    <?php endif; if(auth("remove")): ?>
                    <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除吗?" data-action="<?php echo url('remove'); ?>" data-value="id#<?php echo htmlentities($vo['id'],ENT_QUOTES); ?>;content_template_id#<?php echo htmlentities($contentTemplateId,ENT_QUOTES); ?>">删除</a>
                    <?php else: ?>
                    <a data-tips-text="您无权限进行此操作！" class="layui-btn layui-btn-sm layui-btn-primary layui-disabled">删除</a>
                    <?php endif; if(auth("associated")): if(empty($vo['associated'])): ?>
                            <a data-open='<?php echo url("associated"); ?>?article_id=<?php echo htmlentities($vo['id'],ENT_QUOTES); ?>&articleTable=<?php echo htmlentities($tableName,ENT_QUOTES); ?>' data-title="关联设置" class='layui-btn layui-btn-sm layui-btn-primary'>添加关联</a>
                        <?php else: ?>
                            <a data-open='<?php echo url("associated_list"); ?>?article_id=<?php echo htmlentities($vo['id'],ENT_QUOTES); ?>&articleTable=<?php echo htmlentities($tableName,ENT_QUOTES); ?>' data-title="关联设置" class='layui-btn layui-btn-sm layui-btn-primary'>查看关联</a>
                        <?php endif; ?>
                    <?php endif; ?>

                    <a href="/index/article/show/cat_id/<?php echo htmlentities($vo['cat_id'],ENT_QUOTES); ?>/id/<?php echo htmlentities($vo['id'],ENT_QUOTES); ?>" class="layui-btn layui-btn-sm layui-btn-primary layui-border-black" target="_blank">浏览</a>

                </div>


            </td>
        </tr>
        <?php endforeach; ?>
        </tbody>
    </table>


    <?php if(empty($tableName) && $isParentCat == 1): ?>
        <span class="notdata layui-font-red">本栏目不可创建内容，如有需要创建内容请为此栏目设置内容模型</span>
    <?php else: if(empty($list) || (($list instanceof \think\Collection || $list instanceof \think\Paginator ) && $list->isEmpty())): ?><span class="notdata">No record</span><?php else: ?><?php echo (isset($pagehtml) && ($pagehtml !== '')?$pagehtml:''); ?><?php endif; ?>
    <?php endif; ?>

</div>

        </div>
    </div>
    
</div>